import request from '../util/request'

export function getClassify(){
    return request.get("/classify")
}
export function getBannder(){
    return request.get("/carousel")
}
export function getClassifygood(){
    return request.get("/classify/classifyGoods")
}
export function getGoods(params){
    return request.get("/goods", params)
}
export function getGooddetail(id){
    return request.get("/goods/"+id)
}
export function  postShoppingcart(params){
    return request.post('/shoppingCart',params)
}
export function  getShoppingcart(params){
    return request.get('/shoppingCart',params)
}
export function  deleteShoppingcart(id){
    return request.delete('/shoppingCart/'+id)
}
export function  updateShoppingcart(id,params){
    return request.put('/shoppingCart/'+id,params)
}

export function getCity(){
    return request.get("/city")
}
//获取订单
export function getOrder(){
    return request.get("/order")
}
//添加订单
export function postOrder(data){
    return request.post("/order",data)
}
//获取地址
export function getAddress(){
    return request.get("/address")
}
//添加地址
export function postAddress(data){
    return request.post("/address",data)
}
//删除地址
export function delectAddress(id){
    return request.delete("/address/"+id)
}
// 修改地址
export function putAddress(data){
    return request.put("/address/"+data.id,data)
}

